package Thread;

public class ThreadInfoDemo {
    public static void main(String[] args) {
        Thread main = Thread.currentThread();
        //获取线程的名字
        System.out.println(main.getName());
        //获取线程的ID
        System.out.println(main.getId());
        //获取线程的优先级
        System.out.println(main.getPriority());
        //判断线程是否活着
        System.out.println(main.isAlive());
        //判断线程是否为守护线程
        System.out.println(main.isDaemon());
        //判断线程是否被中断了
        System.out.println(main.isInterrupted());
    }
}
